/*
package com.wishtree.common;

import com.wishtree.domain.entity.User;
import graphql.annotations.annotationTypes.*;
import graphql.annotations.annotationTypes.directives.activation.Directive;
import graphql.kickstart.graphql.annotations.GraphQLQueryResolver;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@GraphQLQueryResolver
@RestController
@NoArgsConstructor
public class QueryResolver {

     List<User> users = new ArrayList<>();

  */
/*  @PreAuthorize("hasAnyAuthority('user:list')")
    public User user(String nickname) {
        User user = new User();
        user.setNickname(nickname);
        users.add(user);
        return user;
    }*//*

    @GraphQLName("users")
    @GraphQLField
//    @GraphQLInvokeDetached
    @GetMapping("/users")
    @AuthDirective
    public List<User> users(@RequestParam List<Long> ids) {
        System.out.printf("ids:"+ids);
        User user = new User(1L, "张三", "111", Collections.EMPTY_LIST);
        this.users.add(user);
        return users;
    }

    @GraphQLName("test")
    @GraphQLField
    @GraphQLInvokeDetached
    @GetMapping("/test")
    public List<User> test(User user) {
        System.out.println(user);
        return Collections.EMPTY_LIST;
    }


}
*/
